import request from '@/utils/request'

// 获取存货下拉菜单数据
export const getproductsApi = (data = '') => {
    return request({
        url: '/system/work/products',
        method: 'post',
        data
    })
}
// 获取外协下拉菜单数据
export const getoutsourcingApi = (data = '') => {
    return request({
        url: '/system/work/outsourcing',
        method: 'post',
        data
    })
}
//获取客户下拉菜单数据
export const getWorkApi = (data = '') => {
    return request({
        url: '/system/work/list',
        method: 'post',
        data
    })
}
//获取业务员下拉菜单数据
export const getEmployeeApi = (data = '') => {
    return request({
        url: '/system/work/employee',
        method: 'post',
        data
    })
}
//获取部门下拉菜单数据
export const getdepartmentseApi = (data = '') => {
    return request({
        url: '/system/work/departments',
        method: 'post',
        data
    })
}
// 提交新增表单
export const getworkInsertApi = (data = '') => {
    return request.post('/system/work/insert',data)
}
// 待办工单接口
export const getselectOrderNoApi = (params) => {
    return request.get('/system/work/selectOrderNo',{params})
}

// 销售单明细查询
export const getselectOrderApi = (params) => {
    return request.get('/system/work/selectOrder',{params})
}
// 修改新增表单
export const getupdateOrderApi = (data = '') => {
    return request.put('/system/work/updateOrder',data)
}
// 删除订单
export const getdepartmentsApi = (data = '') => {
    return request.post('/system/work/deleteOrder',data)
}
// 设计师下拉
export const getdesignerMentsApi = (data = '') => {
    return request({
        url: '/system/work/designer',
        method: 'post',
        data
    })
}

// /system/work

// check  审核工单
//     * @param id
//     * @param type 审核状态  （审核通过 驳回）

// getInfo  获取工单详情
//     * @param id   工单id

// 审核工单
export const auditCheckApi = (data = '') => {
    return request({
        url: '/system/work/check',
        method: 'get',
        params:data
    })
}
// 获取工单详情
export const getInfoApi = (data = '') => {
    return request({
        url: '/system/work/getInfo',
        method: 'get',
        params:data
    })
}
// 获取工单详情
export const selectOrderAllApi = (data = '') => {
    return request({
        url: '/system/work/selectOrderAll',
        method: 'get',
        params:data
    })
}